Skip to content

Xplat building via cmd line or IDE (Xamarin Studio / MonoDevelop) #1127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

sushihangover
Copy link

Note: I have not 're-confirmed' xUnit tests on *nix, VM access unavailable at the moment

Added exe wrapper for CustomBuildTasks.dll to allow xplat project building with the following:
* Xamarian Studio v5.9.x+ / MonoDevelop v5.9.x+
* mdtool (matching version from above's IDE installation)
* xbuild (from mono 4.0.2+ installation)

Xplat building via cmd line or IDE (Xamarin Studio / MonoDevelop)

From repo's root directory, perform the following:

Build the wrapper for project's custom build tasks:

xbuild Lib/CustomBuildTasks/CustomBuildTasksExe/CustomBuildTasksExe.csproj

Build LibGit2Sharp.dll:

xbuild LibGit2Sharp/LibGit2Sharp.csproj

Build and Run xUnit tests:

xbuild LibGit2Sharp.Tests/LibGit2Sharp.Tests.csprol
# Tests have to be run from output dir to prevent a test failure:
#  * LibGit2Sharp.Tests.CleanFixture.CannotCleanABareRepository [FAIL]
#  * System.IO.DirectoryNotFoundException : Directory '/xxx/Resources/testrepo.git' not found.
cd LibGit2Sharp.Tests/bin/Debug
mono ../../../packages/xunit.runners.1.9.2/tools/xunit.console.exe LibGit2Sharp.Tests.dll

Results:

OS-X 10.10.3

Mono 4.0.2 32-bit (latest public MDK release):

mono --version
Mono JIT compiler version 4.0.2 ((detached/c99aa0c Thu Jun 11 18:53:01 EDT 2015)

xUnit Test Output:

Using default runtime: v4.0.30319
xUnit.net console test runner (32-bit .NET 4.0.30319.17020)
Copyright (C) 2013 Outercurve Foundation.
xunit.dll:     Version 1.9.2.1705
...
1291 total, 0 failed, 8 skipped, took 182.804 seconds

Mono 4.3.0 64-bit (master - bleeding edge):

mono --version
Mono JIT compiler version 4.3.0 (master/e02e386 Sun Jun 28 22:03:31 PDT 2015)

xUnit Test Output:

Using default runtime: v4.0.30319
xUnit.net console test runner (64-bit .NET 4.0.30319.17020)
Copyright (C) 2013 Outercurve Foundation.
xunit.dll:     Version 1.9.2.1705
....
1291 total, 0 failed, 8 skipped, took 147.674 seconds

@sushihangover sushihangover force-pushed the xplat branch 2 times, most recently from 9e783c6 to e2c02f3 Compare June 29, 2015 17:49
@nulltoken
Copy link
Member

@sushihangover Could you please take a look at the build failure?

@carlosmn @Therzok @bording What's your opinion about this approach?

@sushihangover sushihangover force-pushed the xplat branch 4 times, most recently from f6c54f3 to a5c5a89 Compare June 29, 2015 22:57
@bording
Copy link
Member

bording commented Jun 29, 2015

I might be missing something, but I'm not sure what it is this is trying to do.

The CustomBuildTasks project isn't something that is built on every build, the output is just saved to the repo and used via the targets files.

What problem is this trying to solve?

@bording
Copy link
Member

bording commented Jun 29, 2015

If this is about removing the .dll from the lib folder, then I'd think we'd be better off taking the NativeBinaries approach, and pull it in via NuGet.

…lding with the following:

* Xamarian Studio v5.9.x+ / MonoDevelop v5.9.x+
* mdtool (matching version from above's IDE installation)
* xbuild (from mono 4.0.2+ installation)
@bording
Copy link
Member

bording commented Jun 30, 2015

Oh, I think I just figured out what it is you're trying to fix! You're trying to build on mono 4, and the CustomBuildTasks project is still using 3.5, which means the checked in dll is probably blowing up since mono 4 removed the 2.0 assemblies.

In that case, I would think the only thing that needs to be done is update CustomBuildTasks to net4, and then check in the new dll. Everything else should just work without any other changes at that point.

Both of the build tasks brought in via the targets files already work fine cross platform when using mono 3.12, so there shouldn't be any need for all of the workarounds/skipping them going on in this commit once the CustomBuildTasks assembly is built with net4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants